<template>
  <view class="page">
    <!-- #ifdef H5-ONLY -->
    <theme-navbar :is-white="false" :custom-back="goBack" style="z-index: 99999" :title="navTitle">
    </theme-navbar>
    <!-- #endif -->
    <view class="content">
      <view class="form-style">
        <view class="form-style-title">
          <view class="left-info-tag"></view>
          <view class="fs-title">其他信息</view>
        </view>
       <view class="peo-sty">
            <view>
                <span class="name">仓库名称</span>
                <span class="val">{{ this.detailInfo.storeName || '/' }}</span>
            </view>
            <view>
                <span class="name">案件编号</span>
                <span class="val">{{ this.detailInfo.caseCode || '/' }}</span>
            </view>
            <view>
                <span class="name">案发时间</span>
                <span class="val">{{ this.detailInfo.caseDate || '/' }}</span>
            </view>
            <view>
                <span class="name">当事人</span>
                <span class="val">{{ this.detailInfo.party || '/' }}</span>
            </view>
            <view>
                <span class="name">承办人</span>
                <span class="val">{{ this.detailInfo.undertaker || '/' }}</span>
            </view>
        </view>
      </view>
      <view style="border-bottom: 20rpx solid #f2f3f5;margin: 26rpx -56rpx;"></view>
      <view class="form-style" style="line-height: 62rpx;">
        <view class="form-style-title">
          <view class="left-info-tag" style="margin-top:14rpx"></view>
          <view class="fs-title">物品明细</view>
        </view>
        <view class="goods" style="align-items: center;padding-top: 10rpx;">
          <view class="goodsBox" v-for="(item,index) in goodsList" :key="index">
            <view class="title-sty">
                <view class="tags">
                    <u-image style="vertical-align: middle;display:inline-block;" src="/static/store/store-home.png"  width="48" height="48"/>
                    <span>{{item.psCode}}</span>
                </view>
            </view>
            <view class="peo-sty">
                <view>
                    <span class="name">物品名称</span>
                    <span class="val">{{ item.goodsName || '/' }}</span>
                </view>
                <view>
                    <span class="name">条码</span>
                    <span class="val">{{ item.stripCode || '/' }}</span>
                </view>
                <view>
                    <span class="name">物品大类</span>
                    <span class="val">{{ item.propTypeName || '/' }}</span>
                </view>
                <view>
                    <span class="name">物品小类</span>
                    <span class="val">{{ item.propSubTypeName || '/' }}</span>
                </view>
                <view>
                    <span class="name">物品数量</span>
                    <span class="val"><span class="qty">{{ item.qty || '/' }}</span>{{item.qty ? '/' : ''}}{{item.unit?item.unit:''}}</span>
                </view>
            </view>
          </view>
          
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { uuid, } from '@/common/util.js';
import storeService from '@/service/store/store.service.js';
export default {
  data() {
    return {
      goodsList: [],
      baseInfo: {},
      isDisabled: true,
    }
  },
  onLoad() {
    this.detailInfo = this.getRouteParam();
    this.detailInfo.uuid = uuid();
  },
  created () {
    this.init();
  },
  methods: {
    init () {
      this.$modal.showLoading('加载中...');
      storeService.queryGoodsDetail({caseCode: this.detailInfo.caseCode}).then(res => {
        if (res.success) {
          this.$modal.hideLoading();
          this.goodsList = res.data
        } else {
          this.$modal.hideLoading();
          console.log(res)
        }
      }).catch(err => {
        this.$modal.hideLoading();
        console.log(err)
      })
    },
  },
}
</script>

<style scoped lang="scss">
.page{
  padding: 28rpx 30rpx;
}
.content {
    padding-bottom: 10rpx;
}
.upload-sty{
  margin-left: -12rpx;
}
.pd-lf{
  padding-left: 0;
}
.pd-tp{
  padding-top: 13px;
}
.content-btn{
  padding: 24rpx 36rpx 20rpx 36rpx;
}
.fs-30{
  font-size:30rpx
}
.title-sty{
padding-bottom: 12rpx;
.tags {
    display: inline-block;
    width: 150rpx;
    height: 60rpx;
    text-align: center;
    line-height: 56rpx;
    background: #ECF6FF;
    border-radius: 16rpx;
    margin-right: 20rpx;
}
span {
    color: #0070D2;
    font-size: 22rpx;
}
}
.It-title{
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #DADADD;
  padding-bottom: 11px;
  align-items: center;
}
.CT-title{
  font-size: 18px;
  font-weight: bold;
}
.CT-label{
  font-size: 13px;
  color: #989EA1;
  padding-bottom: 6px;
}
.CT-value{
  font-size: 14px;
  color: #393B3D;
}
.form-style-title{
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  width: 100%;
  align-items: flex-start;
}
.form-style{
  padding: 0rpx 8rpx
}
.left-info-tag{
  padding: 8px 2px;
  background-color: #ee8c4f ;
  border-radius: 22px;
  margin: 3px 6px 13px 0px;
}
.left-info-check-tag{
  padding: 8px 2px;
  background-color: #ee8c4f;
  border-radius: 22px;
  margin: 3px 6px 13px 0px;
}
.fs-title{
  font-weight: bold;
  font-size: 32rpx;
}
.loc-box {
  line-height: 38px;
  padding: 11px 0;
  font-size: 13px;
  color: #303133;
}
.peo-sty{
    font-size: 26rpx;
    .name {
        color: #999999;
        font-size: 26rpx;
        margin-right: 20rpx;
        margin-bottom: 20rpx;
        display: inline-block;
        width: 140rpx;
    }
    .val {
        color: #666666;
    }
}
.goods {
    .peo-sty {
        line-height: 22px;
    }
    .name {
        margin-bottom: 0;
        color: #666666;
    }
}
.goodsBox {
    margin-bottom: 40rpx;
    .qty {
        color:#0070D2;
    }
}
.inline-box {
  display: flex;
  align-items: center;
}
.loc-inline{
  font-size: 13px;
  color: #666666;
}
.part-item-info {
  text-align: left;
  .sub-title {
    color: $u-tips-color;
    padding-bottom: 10rpx;
    font-size: 26rpx;
  }
  .main-info {
    color: $u-content-color;
    font-weight: 600;
    margin-bottom: 5px;
  }
  .main-info-color {
    color: $u-content-color;
    font-weight: 600;
    margin-bottom: 5px;
    color: red;
  }
}
.total-sty{
  padding-top: 20rpx;
}
.good-popup-lay {
		padding: $cm-content-paddng-row;
		width: 100%;
		height: 100%;

		&__title {
			font-size: 36rpx;
			font-weight: 600;
			color: $u-main-color;
			margin: 10rpx 0;
			text-align: center;
			width: 100%;
		}

		&__btns {
			width: 100%;
			margin-top: 24rpx;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			uni-button {
				flex: 0.28;
			}
		}
	}
</style>